<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>20 Random Divs</title>
	<script language="JavaScript">
		function generateDivs()
		{
			for(var i = 0; i < 20; i ++)
			{
				var left = Math.floor(Math.random() * 1001);
				var top  = Math.floor(Math.random() * 9001);
				var height = Math.floor(Math.random() * 400);
				var width = Math.floor(Math.random() * 400);
				var decimalColor = Math.floor(Math.random() * 16777216);
				var color = "#" + decimalColor.toString(16);
				document.write("<div style='left: " + left + "px; position: absolute; top: " + top + "px; height: " + 
					height + "px; width: " + width + "px; background-color: " + color + "'>Text</div>");
			}
		}
	</script>
</head>

<body onload="generateDivs()">
</body>
</html>